# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

"""
Balloon.py
By: Denver Coneybeare <denver@sleepydragon.org>
Oct 28, 2012
"""

from __future__ import print_function
from __future__ import unicode_literals

class Balloon(object):
    """
    A balloon tooltip for a NotifyIcon.
    """

    ICON_INFO = "ICON_INFO"
    ICON_WARNING = "ICON_WARNING"
    ICON_ERROR = "ICON_ERROR"
    ICON_FROM_OWNER = "ICON_FROM_OWNER"

    def __init__(self, text, title=None, icon=None, is_realtime=False,
            sound_enabled=True, respect_quiet_time_enabled=True):
        """
        Initializes a new instance of this class.
        *text* must be a Unicode string whose value will be used as the
        title of the balloon notification;
        NotifyIcon.assert_valid_balloon_text() can be used to determine
        whether or not an object constitutes a valid value for this field;
        note that an empty string for this value will cause no notification to
        be displayed (but will remove any balloon notification currently being
        displayed).
        *title* must be a Unicode string whose value will be used as the
        title of the balloon notification;
        NotifyIcon.assert_valid_balloon_title() can be used to determine
        whether or not an object constitutes a valid value for this field;
        may be None (the default) for no title.
        *icon* must be an Icon object and will be used as the icon in the
        notification area; may be None (the default) to not use any icon;
        may also be equal to any of the ICON_ constants defined in this class
        in order to use the corresponding system icon.
        *is_realtime* is evaluated as a boolean; if it evaluates to True, the
        if the notification cannot be immediately displayed, it will be
        discarded; otherwise, if False (the default), then the notification
        will be queued and displayed when possible.
        *sound_enabled* is evaluated as a boolean; if it evaluates to True
        (the default) then an audible notification may be generated when this
        notification is displayed; if False, then the audible notification will
        be suppressed.
        *respect_quiet_time_enabled* is evaluated as a boolean; if it evaluates
        to True (the default) then the notification may be discarded or queued
        if the computer is in the "quiet time", ", which is the first hour after
        a new user logs into his or her account for the first time; if False,
        then the notification will be displayed irrespective of whether or not
        the user is in "quiet time".
        """
        self.text = text
        self.title = title
        self.icon = icon
        self.is_realtime = is_realtime
        self.sound_enabled = sound_enabled
        self.respect_quiet_time_enabled = respect_quiet_time_enabled
